<?php
// +----------------------------------------------------------------------
// | 海豚PHP框架 [ DolphinPHP ]
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 河源市卓锐科技有限公司 [ http://www.zrthink.com ]
// +----------------------------------------------------------------------
// | 官方网站: http://dolphinphp.com
// +----------------------------------------------------------------------
// | 开源协议 ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------

namespace app\admin\validate;

use think\Validate;

/**
 * 验证场景验证器
 * @package app\admin\validate
 * @author 陈梦晨 <2391157750@qq.com>
 */
class ValidationScene extends Validate
{
    //定义验证规则
    protected $rule = [
        'scenename|验证场景名称' => 'require',
        'scenecode|验证场景代码' => 'require',
        'scenecode|验证场景代码' => 'unique:validation_scene,scenecode',
    ];

    //定义验证提示
    protected $message = [
        'scenename.require' => '验证场景名称不能为空',
        'scenecode.require' => '验证场景代码不能为空',
        'scenecode.unique' => '验证场景代码已经存在',
    ];
}
